package com.moli.iov.notify.remote;

import com.moli.iov.notify.model.dto.NoticeAlarmDto;
import com.moli.iov.notify.model.dto.NoticeMailDto;
import com.moli.iov.notify.model.dto.NoticeSmsDto;
import com.moli.iov.notify.model.dto.NoticeVehicleCtlDto;
import com.moli.iov.rest.RestResponse;

import java.util.List;

/**
 *
 * Based on distributed Remote alarm and vehicle control notice service.
 *
 * @author OAK
 * @version 3.0
 * @since 2019/10/17 14:30 PM.
 */
public interface INoticeRemoteService {

    /**
     * According notice alarm data transfer object to query all notice alarm.
     * @param noticeAlarmDto notice alarm data transfer object
     * @return Whether success.
     */
    RestResponse<List<NoticeAlarmDto>> queryAllNoticeAlarmByProperties(NoticeAlarmDto noticeAlarmDto);

    /**
     * According notice vehicle control data transfer object to query all notice vehicle control.
     * @param noticeVehicleCtlDto notice vehicle control data transfer object
     * @return Whether success.
     */
    RestResponse<List<NoticeVehicleCtlDto>> queryAllNoticeVehicleCtlByProperties(NoticeVehicleCtlDto noticeVehicleCtlDto);

    /**
     * According notice mail data transfer object to query email.
     * @param companyId Company id.
     * @param mailType Email type.
     * @param mailCode Email code.
     * @return Whether success.
     */
    RestResponse<String> queryMailByNoticeMail(Long companyId, Integer mailType, Integer mailCode);

    /**
     * According notice sms data transfer object to query mobile.
     * @param companyId Company id.
     * @param smsType Sms type.
     * @param smsCode Sms code.
     * @return Whether success.
     */
    RestResponse<String> queryMobileByNoticeSms(Long companyId, Integer smsType, Integer smsCode);

    /**
     * According notice sms data transfer object to add notice sms.
     * @param noticeSmsDto notice sms data transfer object.
     * @return Restful response status.
     */
    RestResponse<String> addNoticeSms(NoticeSmsDto noticeSmsDto);

    /**
     * According notice email data transfer object to add notice email.
     * @param noticeMailDto notice email data transfer object.
     * @return Restful response status.
     */
    RestResponse<String> addNoticeMail(NoticeMailDto noticeMailDto);

    /**
     *  Enabled vehicle control sms or email.
     * @param id Alarm notice id.
     * @param status Enabled all or sms or email.
     * @return Restful response status.
     */
    RestResponse<String> enableNoticeAlarm(Integer id, String status);

    /**
     *  Disabled vehicle control sms or email.
     * @param id Alarm notice id.
     * @param status Disabled all or sms or email.
     * @return Restful response status.
     */
    RestResponse<String> disabledNoticeAlarm(Integer id, String status);

    /**
     *  Enabled vehicle control sms or email.
     * @param id Vehicle control notice id.
     * @param status Enabled all or sms or email.
     * @return Restful response status.
     */
    RestResponse<String> enabledNoticeVehicleCtl(Integer id, String status);

    /**
     *  Disabled vehicle control sms or email.
     * @param id Vehicle control notice id.
     * @param status Disabled all or sms or email.
     * @return Restful response status.
     */
    RestResponse<String> disabledNoticeVehicleCtl(Integer id, String status);

    //根据companyId插入默认控车通知（报警通知数据）
    RestResponse<Boolean> addDefaultNotice(Long companyId);

}
